package com.neo4j.neo4jcloud.mapper;

import com.neo4j.neo4jcloud.entity.SupplyRelationShip;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;

import java.util.List;

/**
 * @author kabuqinuo
 * @date 2020/3/26 13:59
 */
public interface SupplyRelationShipRepository extends Neo4jRepository<SupplyRelationShip, Long> {

    @Query("match n = (p:CompanyGraph{NodeId:'node-0'})-[r]-(c:SupplyGraph) where c.NodeId = {nodeId} return n")
    List<SupplyRelationShip> findByNodeId(String nodeId);
}
